<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        a {
            text-decoration: none;
            color: #1106ff;
        }
    </style>
</head>
<body>
<div th:insert="~{front/header::head}"></div>
<div th:each="article:${articlePageInfo.getList()}">
    <div style="text-align: center">
        <h1 th:text="${article.getTitle()}"></h1>
        <div style="font-size: 20px">作者：<span th:text="${article.getAuthor()}"></span></div>
    </div>
    <p style="text-align: center;font-size: 25px;" th:text="${article.getContent()}"></p>
    <p style="text-align: center">
        <a style="font-size: 20px" th:href="@{front/article(id = ${article.getArtid()})}"
        >查看详情</a></p>
    <hr>
</div>
<div style="text-align: center;margin: 30px auto;font-size: 20px" >
    <a th:href="@{/(pageNum=1)}">首页</a>
    <label th:if="${!articlePageInfo.isIsFirstPage()}">
        <a th:href="@{/(pageNum=${articlePageInfo.getPrePage()})}">上一页</a>
    </label>
    <label th:if="${!articlePageInfo.isIsLastPage()}">
        <a th:href="@{/(pageNum=${articlePageInfo.getNextPage()})}">下一页</a>
    </label>
    <a th:href="@{/(pageNum=${articlePageInfo.getPages()})}">尾页</a>
    当前第<span th:text="${articlePageInfo.getPageNum()}"></span>页/共<span
        th:text="${articlePageInfo.getPages()}"></span>页
</div>
</body>
</html>

